import TaskForm from "@/app/(home)/new/task-form";
import { redirect } from "next/navigation";
import { HydrateClient, trpc } from '@/trpc/server';
import TaskEditPageView from "@/modules/tasks/view/edit-task";
import { ErrorBoundary } from 'react-error-boundary';
import { Suspense } from "react";

const TaskEditPage = async ({ params }: { params: { id: any } }) => {
  const { id } = await params
  void trpc.tasks.getOne.prefetch({ id: Number(id)  })

  return (
    <HydrateClient>
      <TaskEditPageView taskId={id}></TaskEditPageView>
    </HydrateClient>
  )

}

export default TaskEditPage;